package it.enea.xlab.validation;


import it.enea.xlab.validation.JNDIServices;
import it.enea.xlab.validation.ValidationManagerRemote;
import it.enea.xlab.validation.XErrorMessage;
import it.enea.xlab.validation.controllers.common.WebController;

import java.rmi.NotBoundException;

import javax.naming.NamingException;

public class ValidationController extends WebController {

	public static final String CONTROLLER_NAME = "ValidationController";
	
	private ValidationManagerRemote validationManagerService;
	
	
	public ValidationController() {
	
	}

	public void initContext() throws NotBoundException, NamingException {
		
		// GET SERVICE
		validationManagerService = JNDIServices.getValidationManagerService(); 		
	}
	
	
	public XErrorMessage[] validation(String xmlRelPathFileName, String xsdURL) {
		
		return validationManagerService.validation(xmlRelPathFileName, xsdURL);
	}

	public Long nothing() {
		
		return validationManagerService.nothing();
	}

}


